/** COPYRIGHT(C) 2008. Loc Phan. All Rights Reserved.
    A test for bank class and bankaccount class
    @author Loc Phan
    @version 1.01 2008-11-20
*/
package edu.sjsu.cs.phan;

import junit.framework.TestCase;

public class BankTester extends TestCase
{
   Bank b1 = new Bank();
   BankAccount account1 = new BankAccount(0,400);
   BankAccount account2 = new BankAccount(1,200);
   BankAccount account3 = new BankAccount(2,100);
   BankAccount account4 = new BankAccount(3,0);
   
   
   public void testCount()
   {
      b1.addAccount(account1);
      b1.addAccount(account2);
      b1.addAccount(account3);
      b1.addAccount(account4);
      assertEquals(1, b1.count(400));
   }

   public void testFind()
   {
      b1.addAccount(account1);
      b1.addAccount(account2);
      b1.addAccount(account3);
      b1.addAccount(account4);
      assertEquals(account3, b1.find(2));
   }
   public void testGetMaximum()
   {
      b1.addAccount(account1);
      b1.addAccount(account2);
      b1.addAccount(account3);
      b1.addAccount(account4);
      assertEquals(account1, b1.getMaximum());
   }

}
